import React, { Component } from 'react'
import { HashRouter, Route, Switch } from 'react-router-dom'
import App from './App'
import Login from './pages/login'
import Admin from './admin'
import Home from './pages/home'
import Buttons from './pages/ui/buttons'
import Modals from './pages/ui/modals'
import Loadings from './pages/ui/loadings'
import Notification from './pages/ui/notification'
import Messages from './pages/ui/messages'
import Tabs from './pages/ui/tabs'
import NotMatch from './pages/notMatch'
import Gallery from './pages/ui/gallery'
import Carousels from './pages/ui/carousel'
import FormLogin from './pages/form/login'
import Register from './pages/form/register'
import BasicTable from './pages/table/basic'
import High from './pages/table/high';
class Router extends Component {
  render() {
    return (
      <HashRouter>
        <App>
          <Switch>
            <Route path="/login" component={Login} />
            <Route
              path="/admin"
              render={() => {
                return (
                  <Admin>
                    <Switch>
                      <Route path="/admin/home" component={Home} />
                      <Route path="/admin/ui/buttons" component={Buttons} />
                      <Route path="/admin/ui/modals" component={Modals} />
                      <Route path="/admin/ui/loadings" component={Loadings} />
                      <Route
                        path="/admin/ui/notification"
                        component={Notification}
                      />
                      <Route path="/admin/ui/messages" component={Messages} />
                      <Route path="/admin/ui/tabs" component={Tabs} />
                      <Route path="/admin/ui/gallery" component={Gallery} />
                      <Route path="/admin/ui/carousel" component={Carousels} />
                      <Route path="/admin/form/login" component={FormLogin} />
                      <Route path="/admin/form/reg" component={Register} />
                      <Route path="/admin/table/basic" component={BasicTable} />
                      <Route path="/admin/table/high" component={High} />
                      <Route component={NotMatch} />
                    </Switch>
                  </Admin>
                )
              }}
            />
            <Route path="/order/detail" />
          </Switch>
        </App>
      </HashRouter>
    )
  }
}
export default Router
